﻿<?php
$url = 'http://bikeshopadmin.olbike.com/V3/?service=Active.GetBaseInfo';

$ch = curl_init();  //开启curl
curl_setopt($ch, CURLOPT_URL, $url);  //curl请求地址
curl_setopt($ch, CURLOPT_POST, 1);   //请求一个正规的HTTP POST请求, 第三个参数要非零
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);   //默认0是直接将信息显示在浏览器中,设为1表示就能取值
curl_setopt($ch, CURLOPT_HEADER,0);  //如果成功,请求头信息不显示, 1就显示
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);  //使用POST方法请求
$buf = curl_exec($ch);    //抓取URL并把它传递给浏览器
$newBuf = json_decode($buf,true);
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>直播列表</title>
    <link rel="stylesheet" type="text/css" href="style/font/iconfont.css">
	<link href="source/plugin/zhibo/static/app/style/reset_css.css" rel="stylesheet" />
	<link href="source/plugin/zhibo/static/app/style/swiper.min.css" rel="stylesheet" />
	<link href="source/plugin/zhibo/static/app/style/all.css" rel="stylesheet" />
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="blank" />
    <meta name="format-detection" content="telephone=no" />




</head>
<body>
<div id="loading"><div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div>



	<div id="VideoBanner">
		<ul>
            <?php foreach($newBuf['data']['hotData'] as $v) {?>
                <li>
                    <a href="plugin.php?id=zhibo&ac=activity&op=view&identify=<?php echo $v['id']?>" target="_blank">
                        <img src="<?php echo $v['logo'] ?>"  />
                    </a>
                </li>
            <?php }?>
<!--			<li><a href="#"><img src="images/banner.jpg" alt="description " /></a></li>-->
		</ul>

	</div>
	<!-- VideoBanner结束 -->

	<section id="VideoList">

            <h3 class="PartTitle"> <i class="iconfont icon-huo"></i> 热门推荐 </h3>

        <?php foreach($newBuf['data']['homeData'] as $v2){ ?>
            <div class="VideoList">
                <div class="photo">
                    <img src="<?php echo $v2['logo'] ?>" alt="description " />
                </div>
                <h5> <?php echo $v2['channelName'] ?></h5>
                <em><i class="iconfont icon-time_fill"></i>正在直播 </em>
                <a href="plugin.php?id=zhibo&ac=activity&op=view&identify=<?php echo $v2['id']?>" class="btn_playvideo">
                    <i class="iconfont icon-bofang"></i>
                </a>
            </div>
        <?php }?>

    		<div class="dropdownmore">下拉加载更多 <i class="iconfont icon-unfold"></i></div>
    </section>
	<!-- VideoList结束 -->
    <script src="source/plugin/zhibo/static/app/js/jquery.js"></script>
    <script src="source/plugin/zhibo/static/app/js/swiper.min.js"></script>
    <script src="source/plugin/zhibo/static/app/js/load2.js"></script>

</body>
</html>
